#include <AST/expr/control/BreakAST.hpp>
#include <global.hpp>

Break::Break() {
}

llvm::Value *Break::codegen() {
    if (builder.GetInsertBlock()->getTerminator() != nullptr)
        return logWarning("Break::codegen: \"break\" is ignored due to"
                          " a terminator is found");
    return builder.CreateBr(theScope.getBreakPoint());
}